package gui.Recebimento;

import bin.Armazem;
import bin.move.Recebimento;
import gui.JanelaPrincipal;
import java.beans.PropertyVetoException;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
@Deprecated
public class ConfirmaRecebimento extends javax.swing.JInternalFrame {

    private JanelaPrincipal janelaPrincipal;

    public ConfirmaRecebimento(JanelaPrincipal jp, Armazem arm, String IDRec, int item, int qty, int fornec, String dataRec) {
        initComponents();
        this.setArm(arm);
        this.setID(IDRec);
        jLabelIDREc.setText("ID: " + IDRec);
        jLabelItem.setText("Item : " + item);
        jLabelQtd.setText("Quantidade : " + qty);
        jLabelVendor.setText("Fornecedor : " + fornec);
        jLabelDateTime.setText("Data do Recebimento: " + dataRec);
        this.setJanelaPrincipal(jp);
    }

    public ConfirmaRecebimento(JanelaPrincipal jp) {
        initComponents();

        jLabelDateTime.setText("Data do Recebimento: " + dataRec);
        this.setJanelaPrincipal(jp);
    }

    // implementar criação do recebimento
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabelIDREc = new javax.swing.JLabel();
        jLabelItem = new javax.swing.JLabel();
        jLabelQtd = new javax.swing.JLabel();
        jLabelVendor = new javax.swing.JLabel();
        jLabelDateTime = new javax.swing.JLabel();
        jButtonConfirma = new javax.swing.JButton();
        CancelajButton2 = new javax.swing.JButton();

        setBackground(new java.awt.Color(255, 255, 255));
        setTitle("Confirmação de Recebimento");
        setToolTipText("");

        jLabel1.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Confirmação de Recebimento!");

        jLabelIDREc.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabelIDREc.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelIDREc.setText("ID: ");

        jLabelItem.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabelItem.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelItem.setText("Item: ");

        jLabelQtd.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabelQtd.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelQtd.setText("Quantidade: ");

        jLabelVendor.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabelVendor.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelVendor.setText("Fornecedor: ");

        jLabelDateTime.setFont(new java.awt.Font("Calibri", 0, 18)); // NOI18N
        jLabelDateTime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelDateTime.setText("Data/Horário: ");

        jButtonConfirma.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/icons/btConcluir.png"))); // NOI18N
        jButtonConfirma.setText("CONFIRMA");
        jButtonConfirma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonConfirmaActionPerformed(evt);
            }
        });

        CancelajButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/icons/btCancelar.png"))); // NOI18N
        CancelajButton2.setText("CANCELA");
        CancelajButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CancelajButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelIDREc, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabelItem, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jLabelQtd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabelVendor, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabelDateTime, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addComponent(jButtonConfirma, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(CancelajButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(22, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelIDREc, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelItem, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelQtd)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelVendor)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelDateTime)
                .addGap(50, 50, 50)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonConfirma)
                    .addComponent(CancelajButton2))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonConfirmaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonConfirmaActionPerformed
      
    }//GEN-LAST:event_jButtonConfirmaActionPerformed

    private void CancelajButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CancelajButton2ActionPerformed
        try {
            this.setClosed(true);
            /// try catch automático da IDE, não sei q tipo de erro colocar aqui
        } catch (PropertyVetoException ex) {
            Logger.getLogger(ConfirmaRecebimento.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_CancelajButton2ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton CancelajButton2;
    private javax.swing.JButton jButtonConfirma;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabelDateTime;
    private javax.swing.JLabel jLabelIDREc;
    private javax.swing.JLabel jLabelItem;
    private javax.swing.JLabel jLabelQtd;
    private javax.swing.JLabel jLabelVendor;
    // End of variables declaration//GEN-END:variables
private Armazem arm;
    private String ID;
    private int item;
    private int qty;
    private int fornec;
    private Date dataRec;

    public Armazem getArm() {
        return arm;
    }

    public void setArm(Armazem arm) {
        this.arm = arm;
    }

    public String getID() {
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }

    public JanelaPrincipal getJanelaPrincipal() {
        return janelaPrincipal;
    }

    public void setJanelaPrincipal(JanelaPrincipal janelaPrincipal) {
        this.janelaPrincipal = janelaPrincipal;
    }

}
